function [svm_avg_acc, ada_avg_acc, tree_avg_acc, maj_avg_acc] = ...
    gogo_all(X1train, X2train, ytrain, gidtrain)
%GOGO Summary of this function goes here
%   Detailed explanation goes here
    svm_avg_acc = 0;
    ada_avg_acc = 0;
    tree_avg_acc = 0;
    maj_avg_acc = 0;
    for gid=1:3
        clear tr_data; clear tr_label;
        clear te_data; clear te_label;
        [tr_data, tr_label, te_data, te_label] = ...
            generate_data_hellinger(X1train, X2train, ytrain, gidtrain, gid);
        
        % svm - normalize before 
        [n_tr_data, norm_params] = norm_data(tr_data);
        n_te_data= norm_data(te_data, norm_params);
        
        [acc, r_svm]= run_svm(n_tr_data, tr_label, n_te_data, te_label, ...
                      10^5, 0.0025);
        svm_avg_acc = svm_avg_acc + acc;
        
        % ada
        ada = fitensemble(tr_data,tr_label,'AdaBoostM1',300,'Tree');
        r_ada = ada.predict(te_data);
        ada_avg_acc = ada_avg_acc + sum(te_label==r_ada)/1200 * 100;
        fprintf('ADA: Result for group %d as test: %f.\n', gid, sum(te_label==r_ada)/1200*100);
        
        % random forest
        rf = classRF_train(tr_data, tr_label, 100);
        r_rf = classRF_predict(te_data, rf);
        tree_avg_acc = tree_avg_acc + sum(te_label==r_rf)/1200 * 100;
        fprintf('Random Forest: Result for group %d as test: %f.\n', ...
                gid, sum(te_label==r_rf)/1200*100);
        
        %majority
        maj_r = mode([r_svm; r_ada; r_rf]);
        maj_avg_acc = maj_avg_acc + sum(te_label==maj_r)/1200 * 100;
        fprintf('Maj: Result for group %d as test: %f.\n', gid, sum(te_label==maj_r)/1200*100);
    end
    svm_avg_acc = svm_avg_acc / 3;
    ada_avg_acc = ada_avg_acc / 3;
    tree_avg_acc = tree_avg_acc / 3;
    maj_avg_acc = maj_avg_acc / 3;
end